<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .apple {
            width: 100%;
            height: 100%;
            background-color: rgb(242, 222, 186);
        }

        .title,
        .tast {
            line-height: 40px;
            font-weight: bold;
            text-align: center;
            color: orange;

        }

        .list .item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 20px;
            color: orange;
        }

        .list .item img {
            width: 50px;
            border-radius: 50%;
        }

        button {
            width: 60px;
            height: 30px;
            border-radius: 20px;
            background-color: orange;
        }

        .list{
            width: 96%;
            margin-left: 2%;
            border-radius: 10px;
            background-color: rgb(252, 250, 247);
        }
     
    </style>
</head>

<body>
    <div id="app">
        <div class="apple">
            <div class="title">任务列表</div>
            <div class="tast">每完成一个任务,即可获得10MB-1GB流量!</div>
            <div class="list">
                <div class="item" v-for="(item,index) in tasklist" v-bind:key="index">
                    <div class="left">
                        <img v-bind:src="item.pic" alt="">
                    </div>
                    <div class="middle">
                        <div class="name">{{item.name}}</div>
                        <div class="desc">{{item.desc}}</div>
                    </div>
                    <div class="reght">
                        <button>{{item.status==1?'去完成':item.status==2?'领取':'已领取'}}</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
<script src="./vue-2.5.21.js"></script>
<script>
    // 实例化Vue对象
    var v = new Vue({
        el: '#app',
        data: {
            tasklist: [
                { id: 1, pic: './1.jpg', name: '咪咕视频送流量', desc: '来咪咕视频,每月领500MB流量奖励', status: 1 },
                { id: 2, pic: './2.jpg', name: '和彩云送福利', desc: '免费领领1000空间+月月2GB', status: 2 },
                { id: 3, pic: './3.jpg', name: '最高40元套餐折扣卷', desc: '参与抽奖,奖励10MB,经验值+10', status: 3 },
                { id: 4, pic: './4.jpg', name: '吃喝玩乐季，超级秒杀', desc: '进入一隐藏二楼参与秒杀,奖励10MB,经验值+10', status: 1 }
            ]
        }
    })
</script>